package com.tools.gensql.config;

import org.noear.solon.ai.chat.ChatConfig;
import org.noear.solon.ai.chat.ChatModel;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

import java.time.Duration;

@Configuration
public class DemoConfig {
    @Bean
    public ChatModel build(@Inject("${solon.ai.chat.demo}") ChatConfig config) {
        config.setTimeout(Duration.ofMinutes(3));
        return ChatModel.of(config).build();
    }
}